package Hpackage;

class Rectangle extends Graphic
{
    private double length;
    private double width;

    // 构造方法
    public Rectangle(double length, double width)
    {
        this.length = length;
        this.width = width;
    }

    // 重写 computeArea 方法
    public double computeArea()
    {
        return length * width;
    }
}